#import "./iteration.fragment.graphql"

query searchIterations($fullPath: ID!, $search: String, $id: ID, $isProject: Boolean = false) {
  group(fullPath: $fullPath) @skip(if: $isProject) {
    id
    iterations(search: $search, in: [TITLE, CADENCE_TITLE], id: $id, includeAncestors: true) {
      nodes {
        ...Iteration
      }
    }
  }
  project(fullPath: $fullPath) @include(if: $isProject) {
    id
    iterations(search: $search, in: [TITLE, CADENCE_TITLE], id: $id, includeAncestors: true) {
      nodes {
        ...Iteration
      }
    }
  }
}
